<template>

  <div>
    <sky-dialog ref="dialog" title="标题">
      <template #body>
        内容......
      </template>
      <template #footer>
        <el-button type="primary">确定</el-button>
        <el-button @click="closed">取消</el-button>
      </template>
    </sky-dialog>

    <el-button type="primary" @click="opend">打开弹框</el-button>
  </div>

</template>

<script lang="ts">
import { defineComponent, ref } from 'vue'

export default defineComponent({
  setup() {
    const dialog = ref()
    const opend = () => {
      dialog.value.openDialog()
    }
    const closed = () => {
      dialog.value.closeDialog()
    }

    return {
      dialog,
      opend,
      closed
    }
  }
})
</script>

